namespace ZR.Model.Models.ProductionControl
{
    /// <summary>
    ///  物料规则配置
    /// </summary>
    [SugarTable("material_rule_config")]
    public class MaterialRuleConfig : BaseEntity
    {
        /// <summary>
        /// 序号
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }

        /// <summary>
        /// 产线代号
        /// </summary>
        [SugarColumn(ColumnName = "line_code")]
        public string LineCode { get; set; }

        /// <summary>
        /// 工位代号
        /// </summary>
        [SugarColumn(ColumnName = "station_code")]
        public string StationCode { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        [SugarColumn(ColumnName = "material_name")]
        public string MaterialName { get; set; }

        /// <summary>
        /// 物料号
        /// </summary>
        [SugarColumn(ColumnName = "material_code")]
        public string MaterialCode { get; set; }

        /// <summary>
        /// 零件图号
        /// </summary>
        [SugarColumn(ColumnName = "drawing_number")]
        public string DrawingNumber { get; set; }

        /// <summary>
        /// 订单号
        /// </summary>
        [SugarColumn(ColumnName = "order_code")]
        public string OrderCode { get; set; }

        /// <summary>
        /// 产品类型
        /// </summary>
        [SugarColumn(ColumnName = "product_type")]
        public string ProductType { get; set; }

        /// <summary>
        /// 起始索引（用于解析规则）
        /// </summary>
        [SugarColumn(ColumnName = "start_index")]
        public int? StartIndex { get; set; }

        /// <summary>
        /// 结束索引（用于解析规则）
        /// </summary>
        [SugarColumn(ColumnName = "end_index")]
        public int? EndIndex { get; set; }

        /// <summary>
        /// 生产批次号
        /// </summary>
        [SugarColumn(ColumnName = "production_batch_num")]
        public string ProductionBatchNum { get; set; }

        /// <summary>
        /// 供应商名称
        /// </summary>
        [SugarColumn(ColumnName = "supplier_name")]
        public string SupplierName { get; set; }

        /// <summary>
        /// 总数
        /// </summary>
        [SugarColumn(ColumnName = "total_count")]
        public int? TotalCount { get; set; }

        /// <summary>
        /// 消耗数量
        /// </summary>
        [SugarColumn(ColumnName = "finished_count")]
        public int? FinishedCount { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [SugarColumn(ColumnName = "note_info")]
        public string NoteInfo { get; set; }

        /// <summary>
        /// BOM版本
        /// </summary>
        [SugarColumn(ColumnName = "bom_version")]
        public string BomVersion { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnName = "creation_time")]
        public DateTime? CreationTime { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        [SugarColumn(ColumnName = "creator_name")]
        public string CreatorName { get; set; }
    }
}